//
//  Picture.m
//  CslpodDictionary
//
//  Created by gtts on 13-4-24.
//  Copyright (c) 2013年 cslpod. All rights reserved.
//

#import "Picture.h"

@implementation PictureDAO

const static NSString* tablename = @"dic_picture";//表名

+ (Class)getBindingModelClass
{
    return [Picture class];
}

+(const NSString *)getTableName
{
    return tablename;
}

@end

@implementation Picture
@synthesize wordID;
@synthesize mainPic;
@synthesize samplePic1;
@synthesize samplePic2;
@synthesize samplePic3;
@synthesize samplePic4;

- (id)init
{
    self = [super init];
    if (self) {
        self.primaryKey = @"wordID";
    }
    return self;
}

- (id)initWithJsonDictionary:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.wordID = [dic objectForKey:@"wordID"];
        self.mainPic = [dic objectForKey:@"mainPic"];
        self.samplePic1 = [dic objectForKey:@"samplePic1"];
        self.samplePic2 = [dic objectForKey:@"samplePic2"];
        self.samplePic3 = [dic objectForKey:@"samplePic3"];
        self.samplePic4 = [dic objectForKey:@"samplePic4"];
    }
    return self;
}

@end
